# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=mmh
pkgver=0.4
pkgrel=1
pkgdesc="MUA for users who like the unix philosophy"
url="http://marmaro.de/prog/mmh/"
arch="all"
license="BSD-3-Clause"
options="checkroot"
makedepends="ncurses-dev autoconf flex"
subpackages="$pkgname-doc"
source="http://marmaro.de/prog/mmh/files/mmh-$pkgver.tar.gz
	symlinks.patch
	gcc-10.patch
	"

prepare() {
	default_prepare
	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/$pkgname \
		--mandir=/usr/share/man \
		--libdir=/usr/lib/$pkgname \
		--localstatedir=/var
	make
}

check() {
	cd test
	./setup-test
	./runalltests
	./teardown-test
}

package() {
	make DESTDIR="$pkgdir" SETGID_MAIL="" install
}

sha512sums="f795aafae4727267ed622feb2b1d5a7dfba3e540d89b155d45e7f532030082a512917f391b12959c7b3a8e5d02ab50c39c63cc79c9a51edb3e6bdba2d2157109  mmh-0.4.tar.gz
7996c6dc8c1c7e02bf8c30c831e57fea79f08436bffee7e2bdbdbb2cb2cb6162a1dc5c75a8500605cd215c4dbdea01764e5bd9a41766e9c9f0663689a9d9396f  symlinks.patch
c9396f9f2106095fbb327816a040e12521572459c96fcb7e6c9f04057b4099faf10cb57464da2068489b44a1a18258e91b9dd4e359450ca732902749de0d42e7  gcc-10.patch"
